<template>
  <div class="xtxDialog">
      <div  class="box">
        <header>
          <h1>{{title}}</h1>
          <span>×</span>      
        </header>
        <main>
          <slot />
        </main>
        <footer>
            <slot name="footer" />
        </footer>
      </div>
  </div>
</template>

<script>
export default {
  name:"xtxDialog2",
  props:{
    title:{
      type:String
    }
  },
  setup () {
    

    return {}
  }
}
</script>

<style lang="less" scoped>
.xtxDialog{
  width:100%;
  height:100%;
  position:fixed;
  top:0;
  left:0;
  background:rgba(0,0,0,0.5);
  .box{
    width:40%;
    height:200px;
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    background:#fff;
    display:flex;
    flex-direction:column;
    header{
       height:60px;
        display:flex;
        justify-content:space-between;
        align-items:center;
        padding:10px;
    }
    footer{
       height:60px;
        display:flex;
        justify-content:center;
        align-items:center;
    }
    main{
      flex:1;
    }

  }
}

</style>